#ifndef _PWM_H_
#define _PWM_H_

#include "stm8s_conf.h"

typedef enum{
	PWM_CH0 = 0x0,
	PWM_CH1 ,
	PWM_CH2,
	PWM_CH3,
}PWM_CH_TYPE;

void pwm_init(void); 
void pwm_set_period(uint16_t ch, uint16_t	ms); 
void pwm_set_duty(uint16_t ch, uint16_t	percent); 
void pwm_enable(uint8_t ch); 
void pwm_stop(uint8_t ch); 
void pwm_chanel_config(uint8_t ch, uint16_t	ms, uint16_t	percent, uint8_t isEnable);
void pwm_output_process(void);

void pwm_gpio_deinit(void);

#endif

